//package com.negative.logic;
//
//import com.negative.activities.InfoActivity;
//import com.negative.activities.MainMenu;
//import com.negative.activities.PurchaseListActivity;
//import com.negative.activities.R;
//import com.negative.activities.SettingsActivity;
//
//import android.app.Activity;
//import android.content.Context;
//import android.content.Intent;
//import android.view.View;
//import android.view.View.OnClickListener;
//
//public class ToolBarListener implements OnClickListener {
//
//	Intent intent;
//	Context context;
//	
//	public ToolBarListener(Context context) {
//		this.context = context;
//	}
//	@Override
//	public void onClick(View v) {
//
//		Activity activity = (Activity) context;
//		switch (v.getId()) {
//		case R.id.settings_icon:
//			if (activity instanceof SettingsActivity) {
//				return;
//			}
//			intent = new Intent(context, SettingsActivity.class);
//			context.startActivity(intent);
//			break;
//		case R.id.info_icon:
////			if (activity instanceof InfoActivity) {
////				return;
////			}
////			intent = new Intent(context, InfoActivity.class);
////			context.startActivity(intent);
//			Thread dialogThread = new Thread() {
//				public void run() {
//					DialogManager.showOKDialog((Activity)context, false, context.getString(R.string.sorry), context.getString(R.string.inactive));
//				}
//			};
//			dialogThread.start();
//			break;
//		case R.id.my_purchases_icon:
//			if (activity instanceof PurchaseListActivity) {
//				return;
//			}
//			intent = new Intent(context, PurchaseListActivity.class);
//			context.startActivity(intent);
//			break;
//		case R.id.home_icon:
//			intent = new Intent(context, MainMenu.class);
//			intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
//			context.startActivity(intent);
//			break;
//
//		default:
//			break;
//		}
//	}
//
//}
